package ch08.shizhang.shizhang02;

import javax.xml.bind.ValidationException;

/**
 * @author 茜茜
 * @date 2024-11-29 22:06
 */
public class TestValidate {
    public static void main(String[] args) {
        ValidatorService service= (ValidatorService) ValidationProxy.newsInstance(new ValidatorServiceImpl());
        try {
            service.validateParameters(5.5);
            service.validateParameters(-1.0);
            service.validateParameters(11.0);
            service.validateParameters(null);
        }catch (ValidationExceion e){
            System.err.println("ValidationException"+e.getMessage());
        }
    }
}
